package sss;

import java.util.Scanner;

/**
 * @author VernHe
 * @date 2021年08月15日 14:12
 */
public class Day_05_2 {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int n = input.nextInt();
        solution(n);
    }

    private static void solution(int n) {
        for (int row = 0; row < n; row++) {
            for (int col = 0; col < n; col++) {
                // 与边界的距离
                int min = Math.min(Math.min(row + 1, n - row), Math.min(col + 1, n - col));
                if (col == n - 1) {
                    System.out.printf(min + "");
                } else {
                    System.out.printf(min + " ");
                }
            }
            System.out.println();
        }
    }
    /**
     *  n = 5
    -1 0 1 2 3 4 5
     *              -1
     * 1 1 1 1 1    0
     * 1 2 2 2 1    1
     * 1 2 3 2 1    2
     * 1 2 2 2 1    3
     * 1 1 1 1 1    4
     *              5
     */
}
